s = 7385137888721 * 4 + 10470245
a = 5000000
while a * a < s:
    a += 1
print(a - 1)
